/**
 * Copyright (C) 2018-2020
 * All rights reserved, Designed By www.yixiang.co
 * 注意：
 * 本软件为www.yixiang.co开发研制
 */
package co.yixiang.modules.shop.service.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author hupeng
 * @date 2020-05-12
 */
@Data
public class YxStoreCategoryDto implements Serializable {

    /**
     * 商品分类表ID
     */
    @ApiModelProperty(value = "商品分类表ID")
    private Integer id;

    /**
     * 父id
     */
    @ApiModelProperty(value = "父id")
    private Integer pid;

    /**
     * 分类名称
     */
    @ApiModelProperty(value = "分类名称")
    private String cateName;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer sort;

    /**
     * 图标
     */
    @ApiModelProperty(value = "图标")
    private String pic;

    /**
     * 是否推荐
     */
    @ApiModelProperty(value = "是否推荐")
    private Integer isShow;

    /*购物返点比率*/
    @ApiModelProperty(value = "购物返点比率")
    private Double profitBackRate;

    /*购物返点开关*/
    @ApiModelProperty(value = "购物返点开关")
    private Integer isProfitBack;


    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<YxStoreCategoryDto> children;

    public String getLabel() {
        return cateName;
    }
}
